package com.turing.customer.controller;

import com.turing.customer.service.CustomerService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

import javax.annotation.Resource;

/**
 *  @author: shihonggang
 *  @Date: 2023/4/10 15:16
 *  @Description: 客户登录(小程序)
 */
@RestController
public class LoginController {

    @Resource
    private CustomerService customerService;

    @GetMapping("login")
    public Result customerLogin(
            @RequestParam(value = "cusNickname", required = false) String cusNickname,
            @RequestParam(value = "cusImg", required = false) String cusImg,
            @RequestParam("openId") String openId
    ){
        return customerService.customerLogin(cusNickname, cusImg, openId);
    }
}
